package com.itic.appbase.framework.type;

public enum PreIncomeChannel {
	//预估收益渠道(C001：京选友惠，C002：天猫，C003：淘宝，C004：京东)
	yh("C001","京选友惠"),tm("C002","天猫"),tb("C003","淘宝"),jd("C004","京东");
	private String state;
	private String name;
	PreIncomeChannel(String state, String name) {
		this.state = state;
		this.name = name;
	}
	public String getState() {
		return state;
	}
	public void setState(String state) {
		this.state = state;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	
	public static PreIncomeChannel getType(String state) {
		PreIncomeChannel preIncomeChannel = null;
		switch (state) {
		case "C001":
			preIncomeChannel = PreIncomeChannel.yh;
			break;
		case "C002":
			preIncomeChannel = PreIncomeChannel.tm;
			break;
		case "C003":
			preIncomeChannel = PreIncomeChannel.tb;
			break;
		case "C004":
			preIncomeChannel = PreIncomeChannel.jd;
			break;
		}
		return preIncomeChannel;
	}
}
